// components/showBuyList/showBuyList.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    showBuyList:{
      type:Array,
      value:[]
    },
    iid:{
      type:Number,
      value:[]
    },
    show:{
      type:Boolean,
      value:true
    }
  },
 
  data: {
   
  },

  /**
   * 组件的方法列表
   */
  methods: {
    do(){
      console.log(this.properties.iid)
      console.log(this.properties.show)
      console.log(this.properties.showBuyList)
      if (this.properties.showBuyList[0].orderStatus == 2) {
        wx.navigateTo({
          url: '../../pages/comments/comments?id='+this.properties.showBuyList[0].id,
        })
      } else if(this.properties.showBuyList[0].orderStatus == 2){
        wx.showModal({
          title:'提示',
          content:'确定收货',
          success(res){
            if (res.confirm) {
              console.log(确定)
            } else if(res.cancel) {
              console.log(取消)
            }
          }
        })
      }
    }
  }
})
